home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / Icecream.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-09  |  697 b   |  31 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. int main()
  4. {
  5. char name[100];
  6. int namelen, count;
  7. unsigned int temp1 = 0;
  8. unsigned int temp2 = 0;
  9. unsigned int temp3 = 0;
  10. unsigned long serial = 0;
  11.  
  12.    printf("iCECREAM's first Crackme, Key Generator\n");
  13.    printf("Coded by Thallium, <Thallium@iName.com>\n");
  14.    printf("\nEnter your name: ");
  15.    gets(name);
  16.    namelen = strlen(name);
  17.    
  18.    for(count = 0 ; count < namelen ; count++)
  19.       {
  20.         temp2 = (name[count] * 2) + temp2 + 0x3a;
  21.         temp3 = (name[count] - 4) + temp1;
  22.         temp1 = (name[count] - 4) * 2 + temp3;
  23.         }
  24.    
  25.    serial = temp1 + temp2 + 0x7d3c;
  26.    
  27.    printf("\nYour serial number is: %lu", serial);
  28.  
  29. return 0;
  30. }
  31.